package com.bwie.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.pojo.TCj;
import com.bwie.service.TCjService;
import com.bwie.mapper.TCjMapper;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
* @author 28463
* @description 针对表【t_cj】的数据库操作Service实现
* @createDate 2025-07-30 08:51:11
*/
@Service
public class TCjServiceImpl extends ServiceImpl<TCjMapper, TCj>
    implements TCjService{
    @Autowired
    TCjMapper tCjMapper;

    @Override
    public R getCjList(PageInfoVo pageInfoVo) {
        Page<TCj> cjPage = new Page<>(pageInfoVo.getPageNum(), pageInfoVo.getPageSize());
        Page<TCj> tCjPage = tCjMapper.selectPage(cjPage, null);
        return R.OK(tCjPage);
    }

    @Override
    public R zddcjList(TCj tCj) {
        tCjMapper.insert(tCj);
        return R.OK();
    }

    @Override
    public R updatecjList(TCj tCj) {
        tCjMapper.updateById(tCj);
        return R.OK();
    }

    @Override
    public R deletecjList(Integer id) {
        tCjMapper.deleteById(id);
        return R.OK();
    }
}




